package com.ljx.recruitment.user.controller;

import com.ljx.recruitment.common.domain.vo.resp.ApiResult;
import com.ljx.recruitment.user.domain.vo.req.EmailSendReq;
import com.ljx.recruitment.user.domain.vo.resp.EmailSendResp;
import com.ljx.recruitment.user.service.EmailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-10-30  22:14
 */
@Api(tags = "邮箱接口")
@RestController
@RequestMapping("/email")
public class EmailController {

    @Autowired
    private EmailService emailService;

    @ApiOperation("发送邮件")
    @PostMapping("/send")
    public ApiResult<EmailSendResp> sendEmail(@RequestBody EmailSendReq req){

        return ApiResult.success(emailService.doSendEmail(req));
    }


}
